<script type="text/javascript" language="javascript" src="/gaf/js/common.js"></script>
<script type="text/javascript" language="javascript" src="/gaf/ckeditor/ckeditor.js"></script>
<script language="javascript" src="/gaf/ckeditor/editor_toolbar.js"></script>
<script type=”text/javascript” src=”/gaf/ckfinder/ckfinder.js”> </script>
<script type="text/javascript">

// This is a sample function which is called when a file is selected in CKFinder.
function ShowFileInfo( fileUrl, data )
{
	var msg = 'The selected URL is: ' + fileUrl + '\n\n';
	// Display additional information available in the "data" object.
	// For example, the size of a file (in KB) is available in the data["fileSize"] variable.
	if ( fileUrl != data['fileUrl'] )
		msg += 'File url: ' + data['fileUrl'] + '\n';
	msg += 'File size: ' + data['fileSize'] + 'KB\n';
	msg += 'Last modifed: ' + data['fileDate'];

	alert( msg );
}

	</script>
<link rel="stylesheet" type="text/css" href="/gaf/css/base.css" />
<link rel="stylesheet" type="text/css" href="/gaf/css/common.css" />
<link rel="stylesheet" type="text/css" href="/gaf/css/table_def.css" />
<p>酒店管理/添加酒店</p>
<form action="/hotel/hotel/doaddhotel">
	<table>
		<tr><td>酒店名称:<input type="text" id="name" name="name">
		酒店等级:<select id="hotellevel" name="hotellevel">
			<option value="-1">---</option>
			<option value="1">A</option>
			<option value="2">AA</option>
			<option value="3">AAA</option>
			<option value="4">AAAA</option>
			<option value="5">AAAAA</option>										
		</select>
		是否推荐:<select id="recommend" name="recommend">
			<option value="0">不推荐</option>
			<option value="1">推荐到首页</option>
			<option value="2">推荐到其他</option>								
		</select>
		提前预定天数设定:<input type="text" id="preday" name="preday"></input>
		</td></tr>
		<tr><td>酒店地址:<input type="text" id="addr" name="addr" size="80"/>
		</td></tr>
	</table>
	<p>酒店所属景区 <select id="sid" name="sid"><?php 
		echo "<option value=-1>----</option>";
		foreach ($this->scelist as $sce){
			echo "<option value=".$sce['sid'].">".$sce['name']."</option>";
		}
	?>
	</select></p>		 
	<p>酒店所属区域  县:<select id='district' name='district'><?php 
								echo "<option value=-1>----</option>";
								foreach ($this->rlist as $r) {	
									if($r['rlevel']==0)	echo "<option value=".$r['rid'].">".$r['rname']."</option>";
							}?>
						</select>
				   市:<select id='city' name="city"><?php
				   		 echo "<option value=-1>----</option>";
				   		 foreach ($this->rlist as $r) {
								if($r['rlevel']==1)	echo "<option value=".$r['rid'].">".$r['rname']."</option>";
							}?>
				   		</select>
				    省:<select id='province' name="province"><?php
				   		 echo "<option value=-1>----</option>";
				   		 foreach ($this->rlist as $r) {
								if($r['rlevel']==2)	echo "<option value=".$r['rid'].">".$r['rname']."</option>";
							}?>
				   		</select>
				    地区:<select id='area' name="area"><?php
				   		 echo "<option value=-1>----</option>";
				   		 foreach ($this->rlist as $r) {
								if($r['rlevel']==3)	echo "<option value=".$r['rid'].">".$r['rname']."</option>";
							}?>
				   		</select>
				   	国外:<select id='foreign' name="foreign"><?php
				   		 echo "<option value=-1>----</option>";
				   		 foreach ($this->rlist as $r) {
								if($r['rlevel']==4)	echo "<option value=".$r['rid'].">".$r['rname']."</option>";
							}?>
				   		</select>
	</p> 
	<div>
	<p>酒店详细描述</p>
	<p>
	<?php
	include ("ckeditor.php" ) ; //加载文件
	$oFCKeditor = new CKeditor() ; //创建一个FCKeditor对象 ID为FCKeditor1
	//$oFCKeditor->basePath="" ; //设置FCKeditor路径
	$oFCKeditor->Value = '' ; //设置默认值
	$oFCKeditor->ToolbarSet = 'Default' ;//工具按钮
	//$oFCKeditor->Create() ;
	include("ckfinder.php");
	CKFinder::SetupCKEditor( $oFCKeditor, '../../' ) ;
	$oFCKeditor->editor ('hoteldetail') ; //创建。注意：若用到模板（如smarty）则$fck = $oFCKeditor->CreateHtml();然后把$fck抛给模板
	?>
	</p>
	</div>
	<div >
		<p>酒店特色描述:</p>
		<p><textarea  title="酒店天气描述" id="hotelfeature" name="hotelfeature" style="overflow:scroll;height:100;width:500"></textarea></p>
		<p>酒店点评:</p>
		<p><textarea  title="酒店点评" id="evaluation" name="evaluation" style="overflow:scroll;height:200;width:500"></textarea></p>
	</div>
	<p><input type="submit" value="确定" onclick="return check();"></p>
</form>